package com.funcas.pcloud.upms;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.jwt.Jwt;
import org.springframework.security.jwt.JwtHelper;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author funcas
 * @version 1.0
 * @date 2018年10月11日
 */
@SpringCloudApplication
@EnableTransactionManagement
@ComponentScan({"com.funcas.pcloud.common.spring","com.funcas.pcloud.upms"})
@EnableCaching
@EnableGlobalMethodSecurity(prePostEnabled = true)
@EnableOAuth2Sso
public class Startup {

    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }

    public static void main(String[] args) {
        SpringApplication.run(Startup.class, args);
    }
}
